<html>
    <head>
        <title>新增操作员</title>
        <link href="{$Think.const.ADMIN_CSS_URL}bootstrap.css" rel="stylesheet" />
        <link href="{$Think.const.ADMIN_CSS_URL}lz-style.css" rel="stylesheet" />
        <script src="{$Think.const.ADMIN_JS_URL}jquery.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}jquery.form.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}bootstrap.js"></script>
        <script language="JavaScript">

            $(function () {
                $('#addform').ajaxForm({
                    beforeSubmit: checkForm, // pre-submit callback
                    success: complete, // post-submit callback
                    dataType: 'json'
                });
                function checkForm() {
                    if ('' == $.trim($('#OperatorID').val())) {
                        $('#success').hide();
                        $('#error').html('[用户ID]不能为空').show();
                        return false;
                    }
                    //可以在此添加其它判断
                }
                function complete(data) {
                    if (data.status === 1) {
                        $('#error').hide();
                        $('#success').html(data.info).show();
                    } else {
                        $('#success').hide();
                        $('#error').html(data.info).show();
                    }
                }

            });
            function checkTitle() {
                $.post('__URL__/checkTitle', {'title': $('#title').val()}, function (data) {
                    $('#result').html(data.info + data.status).show();
                }, 'json');
            }

        </script>

    </head>
    <body>
        <div class="container">
            <div class="row div_head" >
                <div class=" col-xs-6 col-sm-6 text-primary">
                    当前位置是：用户管理>新增用户
                </div>
                <div class=" col-xs-6 col-sm-3"></div>
                <div class=" col-xs-6 col-sm-3">
                    <a style="text-decoration: none" href="__CONTROLLER__/lst">【返回】</a>
                </div>
            </div>

            <hr />
            <div class="row div_form" >
                <form id="addform" action="__SELF__" method="post">
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="OperatorName" class="control-label">用户ID</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="text" id="OperatorID" name="OperatorID" class="form-control" placeholder="用户ID"  value="" maxlength="42"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="OperatorName" class="control-label">用户名</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="text" id="OperatorName" name="OperatorName" class="form-control" placeholder="用户名"  value="" maxlength="50" />
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="LoginPasswd" class="control-label">登陆密码</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="password" id="LoginPasswd" name="LoginPasswd" class="form-control" placeholder="登陆密码"  value="" maxlength="12"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="LoginPasswd2" class="control-label">重复登陆密码</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="password" id="LoginPasswd2" name="LoginPasswd2" class="form-control" placeholder="重复登陆密码"  value="" maxlength="12"/>
                    </div>
                    <div class="col-xs-6 col-sm-3">
                    </div>
                    <div class="col-xs-6 col-sm-3">
                    </div>
                    <div class="col-xs-6 col-sm-3">
                        <input type="submit" id="search"  class="btn btn-default" value="提交">
                        <input type="reset" class="btn btn-default" value="清 空">
                    </div>

                </form>
            </div>
            <div id="error" class="row text-danger"></div>
            <div id="success" class="row text-success"></div>

        </div>

    </body>
</html>
